<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<link rel="stylesheet" type="text/css" href="fd.css" />
<meta name="description"
content="C/C++ version of Minpack, the software for solving nonlinear equations and nonlinear least squares problems" />
<meta name="keywords"
content="Minpack, C++, C, Nonlinear equations, Nonlinear least-squares, Levenberg-Marquardt" />
<title>C/C++ Minpack</title>
</head>
<body>

<h1>C/C++ Minpack</h1>

<h2>What is Minpack?</h2>

<p>This is the official description of Minpack, from the original ReadMe file:
Minpack includes software for solving nonlinear equations and
nonlinear least squares problems.  Five algorithmic paths each include
a core subroutine and an easy-to-use driver.  The algorithms proceed
either from an analytic specification of the Jacobian matrix or
directly from the problem functions.  The paths include facilities for
systems of equations with a banded Jacobian matrix, for least squares
problems with a large amount of data, and for checking the consistency
of the Jacobian matrix with the functions.</p>

<p>The original authors of the FORTRAN version are Jorge More', Burt
Garbow, and Ken Hillstrom from Argonne National Laboratory, and the
code can be obtained from <a href="http://www.netlib.org/">Netlib</a>.</p>

<p>Minpack is probably the best open-source implementation of the
Levenberg-Marquardt algorithm (in fact, it is even better, since it
adds to L-M automatic variables scaling). There is another open-source
L-M implementation in C/C++, <a
href="http://www.ics.forth.gr/~lourakis/levmar/">levmar by Manolis
Lourakis</a>, but unfortunately is is released under the GPL, which
restricts its inclusion in commercial software. Minpack is licensed under a BSD-like license (available in the distribution).</p>

<h2>What about CMinpack?</h2>

<p>In July 2002 (before <a
href="http://www.ics.forth.gr/~lourakis/levmar/">levmar</a>), Manolis
Lourakis (lourakis at ics forth gr) released a <a
href="http://www.netlib.org/minpack/cminpack.tar">C version of
Minpack, called CMinpack</a>, obtained from the FORTRAN version using f2c and some
limited manual editing. However, this version had several problems,
which came from the FORTRAN version:</p>
<ol>
<li>All the function prototypes were following the original FORTRAN call conventions, so that all parameters are passed by reference (if a function needs an int parameter, you have to pass a pointer to this int).</li>
<li>There were lots of static variables in the code, thus you could not optimize a function which required calling Minpack to be evaluated (a minimization-of-minimization problem for example): <em>The Minpack code is not reentrant.</em></li>
<li>If the function to be optimized has to use extra parameters or data (this is the case most of the time), the only way to access them was though global variables, which is very bad, especially if you want to use the same function with different data in different threads: <em>The Minpack code is not MT-Safe.</em></li>
<li>There was no C/C++ include file.</li>
<li>Examples and tests were missing from the distribution, although there are some FORTRAN examples in the documentation.</li>
</ol>

<h2>Why is C/C++ Minpack better?</h2>

<p>I took a dozen of hours to rework all these problems, and came out with a pure C version of Minpack, with has standard (ISO C99) parameters passing, is fully reentrant, multithread-safe, and has a full set of examples and tests:</p>
<ol>
<li>Input variables are now passed by value, output variables are passed by reference. The keyword "const" is used as much as possible for constant arrays. The return value of each function is now used to get the function status (it was obtained via the IFLAG or INFO parameter in Minpack).</li>
<li>All non-const static variables were removed, and the code was tested after that. Luckily, Minpack didn't use the nastiest feature in FORTRAN: all local variables are static, so that a function can behave differently when you call it several times.</li>
<li>The function to be minimized and all the Minpack functions now take an extra "void*" argument, which can be used to pass any pointer-to-struct or pointer-to-class, and you can put all you extra parameters and data in that struct. Just cast this pointer to the appropriate pointer type in your function, and there they are! There is no need for global variables anymore. Be careful if you access the same object from different threads, though (a solution is to protect this extra data with a mutex).</li>
<li>The Debian project did a C include file for Minpack. It still needed some work (add consts and C++ compatibility), so I did this work, and used the include file for the FORTRAN version as the base for my C/C++ version.</li>
<li>The Debian project also translated all the FORTRAN examples to C. I worked from these to produce examples which also call my C/C++ version of Minpack instead of the FORTRAN version. Also included in the distribution are reference output files produced by the test runs (for comparison).</li>
</ol>

<p>If you use C/C++ Minpack for a publication, you should cite it as:</p>
<pre>
@misc{cminpack,
  title={C/C++ Minpack},
  author={Devernay, Fr{\'e}d{\'e}ric},
  year={2007},
  howpublished = "\url{http://devernay.github.io/cminpack}",
}
</pre>

<h2>Distribution</h2>

<p>The distribution contains:</p>
<ul>
<li>The CMinpack code, where static and global variables were removed (it is thus reentrant, but not MT-Safe).</li>
<li>The C/C++ Minpack code (reentrant and MT-Safe).</li>
<li>C and C++-compatible include files for Minpack or CMinpack (minpack.h) and C/C++ Minpack (cminpack.h), and Unix Makefiles.</li>
<li>Full original documentation, translated to HTML, and all the examples, tests, and reference test results, so that you can check if the code runs properly on your machine before really using it.</li>
<li>The extra covariance function "covar", with sample uses in the tlmder and tlmdir examples. Note that the result of covar has to be scaled by some factor, as shown in the source file examples/tlmderc.c (look for the documentation of the <a href="http://www.nag.co.uk/">NAG</a> function <a href="http://www.nag.co.uk/numeric/fl/manual/xhtml/E04/e04ycf.xml">E04YCF</a> for further explanations).</li>
</ul>

<p>It is distributed under the original Minpack license (see the file CopyrightMINPACK.txt in the distribution).</p>

<h3>Download</h3>
<ul>
  <li><a href="https://github.com/devernay/cminpack/archive/v1.3.7.tar.gz">cminpack-1.3.7.tar.gz</a> (not yet released)</li> 
  <li><a href="https://github.com/devernay/cminpack/archive/v1.3.6.tar.gz">cminpack-1.3.6.tar.gz</a> (latest version)</li> 
  <li><a href="https://github.com/devernay/cminpack/archive/v1.3.5.tar.gz">cminpack-1.3.5.tar.gz</a></li> 
  <li><a href="http://devernay.free.fr/hacks/cminpack/cminpack-1.3.4.tar.gz">cminpack-1.3.4.tar.gz</a></li> 
  <li><a href="http://devernay.free.fr/hacks/cminpack/cminpack-1.3.3.tar.gz">cminpack-1.3.3.tar.gz</a></li> 
  <li><a href="http://devernay.free.fr/hacks/cminpack/cminpack-1.3.2.tar.gz">cminpack-1.3.2.tar.gz</a></li> 
  <li><a href="http://devernay.free.fr/hacks/cminpack/cminpack-1.3.1.tar.gz">cminpack-1.3.1.tar.gz</a></li> 
  <li><a href="http://devernay.free.fr/hacks/cminpack/cminpack-1.2.2.tar.gz">cminpack-1.2.2.tar.gz</a></li>
  <li><a href="http://devernay.free.fr/hacks/cminpack/cminpack-1.2.1.tar.gz">cminpack-1.2.1.tar.gz</a></li>
  <li><a href="http://devernay.free.fr/hacks/cminpack/cminpack-1.2.0.tar.gz">cminpack-1.2.0.tar.gz</a></li>
  <li><a href="http://devernay.free.fr/hacks/cminpack/cminpack-1.1.5.tar.gz">cminpack-1.1.5.tar.gz</a></li>
  <li><a href="http://devernay.free.fr/hacks/cminpack/cminpack-1.1.4.tar.gz">cminpack-1.1.4.tar.gz</a></li>
  <li><a href="http://devernay.free.fr/hacks/cminpack/cminpack-1.1.3.tar.gz">cminpack-1.1.3.tar.gz</a></li>
  <li><a href="http://devernay.free.fr/hacks/cminpack/cminpack-1.1.1.tar.gz">cminpack-1.1.1.tar.gz</a></li>
  <li><a href="http://devernay.free.fr/hacks/cminpack/cminpack-1.0.4.tar.gz">cminpack-1.0.4.tar.gz</a></li>
  <li><a href="http://devernay.free.fr/hacks/cminpack/cminpack-1.0.3.tar.gz">cminpack-1.0.3.tar.gz</a></li>
  <li><a href="http://devernay.free.fr/hacks/cminpack/cminpack-1.0.2.tar.gz">cminpack-1.0.2.tar.gz</a></li>
  <li><a href="http://devernay.free.fr/hacks/cminpack/cminpack-1.0.1.tar.gz">cminpack-1.0.1.tar.gz</a></li>
</ul>


<p>GitHub repository: <a href="https://github.com/devernay/cminpack">https://github.com/devernay/cminpack</a></p> 

<h3>Using CMinpack</h3>

<p>The CMinpack calls have the same name as the FORTRAN functions, in lowercase (e.g. <code>lmder(...)</code>). See the links to the documentation below, or take a look at the simple examples in the <code>examples</code> directory of the distribution. The simple examples are named after the function they call: <code>tlmder.c</code> is the simple example for <code>lmder</code>.</p>
<p>If you want to use the single precision CMinpack, you should define __cminpack_float__ before including <code>cminpack.h</code>. __cminpack_half__ has to be defined for the half-precision version (and the code needs to be compiled with a C++ compiler).</p>
<p>The single-precision versions of the functions are prefixed by "s" (as in "<code>slmder(...)</code>"), and the half-precision are prefixed by "h".</p>
<p>CMinpack defines __cminpack_real__ as the floating point type, and the <code>__cminpack_func__()</code> macro can be used to call CMinpack functions independently of the precision used (as in the examples). However, you shouldn't use these macros in your own code, since your code is probably designed for a specific precision, and you should prefer calling directly <code>lmder(...)</code> or <code>slmder(...)</code>.</p>

<h2>Documentation</h2>
<ul>
  <li>The <a href="minpack-documentation.txt">original documentation for MINPACK</a></li>
  <li>The <a href="man.html">Debian GNU/Linux manual pages for MINPACK</a></li>
  <li><a href="http://en.wikipedia.org/wiki/MINPACK">MINPACK on Wikipedia</a></li>
  <li>B.S. Garbow, K.E. Hillstrom and J.J. Mor&eacute;: Implementation Guide for MINPACK-1.  <a href="http://digital.library.unt.edu/ark:/67531/metadc283464/">ANL-80-68</a>  (July 1980)</li>
  <li>J.J. Mor&eacute;, B.S. Garbow and K.E. Hillstrom: User Guide for MINPACK-1.  ANL-80-74  (August 1980) : <a href="http://www-unix.mcs.anl.gov/~more/ANL8074a.pdf">Chapters 1-3</a>, <a href="http://www-unix.mcs.anl.gov/~more/ANL8074b.pdf">Chapter 4</a></li>
  <li>Documentation for the test functions (the fourteen nonlinear equations problems defined in <code>vecfcn.f/.c</code> and <code>vecjac.f/.c</code>, the eighteen nonlinear least squares problems defined in <code>ssqfcn.f/.c</code> and <code>ssqjac.f/.c</code>, and the eighteen nonlinear unconstrained minimization problems defined in <code>objfcn.f</code>, <code>grdfcn.f</code> and <code>hesfcn.f</code>) can be found in the following papers:
  <ul>
    <li>Moré, J. J., Garbow, B. S., and Hillstrom, K. E. (1981). <a href="http://scholar.google.fr/scholar?q=10.1145%2F355934.355936">Testing Unconstrained Optimization Software</a>. <i>ACM Transactions on Mathematical Software (TOMS)</i>, 7(1), 17-41. <a href="http://dx.doi.org/10.1145/355934.355936">doi:10.1145/355934.355936</a></li>
    <li>Moré, J. J., Garbow, B. S., and Hillstrom, K. E. (1981). Algorithm 566: FORTRAN Subroutines for Testing Unconstrained Optimization Software [C5],[E4]. <i>ACM Transactions on Mathematical Software (TOMS)</i>, 7(1), 136-140. <a href="http://dx.doi.org/10.1145/355934.355943">doi:10.1145/355934.355943</a></li>
    <li>Averbukh, V. Z., Figueroa, S., and Schlick, T. (1992). <a href="https://ftp.cs.nyu.edu/web/Research/TechReports/TR1992-610/TR1992-610.pdf">HESFCN| A FORTRAN Package of Hessian Subroutines for Testing Nonlinear Optimization Software</a>. <i>New York University, New York, NY</i>.</li>
    <li>Averbukh, V. Z., Figueroa, S., and Schlick, T. (1994). Remark on algorithm 566. <i>ACM Transactions on Mathematical Software (TOMS)</i>, 20(3), 282-285. <a href="http://dx.doi.org/10.1145/192115.192128">doi:10.1145/192115.192128</a></li>
  </ul>
</li>
</ul>

<h2>References</h2>
<h3>LMDER/LMDIF</h3>
<ul>
  <li>J.J. Mor&eacute;, "The Levenberg-Marquardt Algorithm, Implementation and Theory", in Numerical Analysis, G.A. Watson, Editor, Lecture Notes in Mathematics 630, Springer-Verlag, 1977. <a href="http://dx.doi.org/10.1007/BFb0067700">doi:10.1007/BFb0067700</a></li>
</ul>
<h3>HYBRJ/HYBRD</h3>
<ul>
  <li> M. J. D. Powell, A Hybrid Method for Nonlinear Equations.
       Numerical Methods for Nonlinear Algebraic Equations,
       P. Rabinowitz, editor. Gordon and Breach, 1970.</li>
</ul>

<h2>Simulating box constraints</h2>

<p>Note that box constraints can easily be simulated in C++ Minpack, using a change of variables in the function (that hint was found in the <a href="http://apps.jcns.fz-juelich.de/doku/sc/lmfit:constraints">lmfit documentation</a>).</p>

<p>For example, say you want <code>xmin[j] &lt; x[j] &lt; xmax[j]</code>, just apply the following change of variable at the beginning of <code>fcn</code> on the variables vector, and also on the computed solution after the optimization was performed:</p>
<pre>
  for (j = 0; j &lt; 3; ++j) {
    real xmiddle = (xmin[j]+xmax[j])/2.;
    real xwidth = (xmax[j]-xmin[j])/2.;
    real th =  tanh((x[j]-xmiddle)/xwidth);
    x[j] = xmiddle + th * xwidth;
    jacfac[j] = 1. - th * th;
  }
</pre>

<p>This change of variables preserves the variables scaling, and is almost the identity near the middle of the interval.</p>

<p>Of course, if you use <code>lmder</code>, <code>lmder1</code>, <code>hybrj</code> or <code>hybrj1</code>, the Jacobian must be also consistent with that new function, so the column of the original Jacobian corresponding to <code>x1</code> must be multiplied by the derivative of the change of variable, i.e <code>jacfac[j]</code>.</p>

<p>Similarly, each element of the covariance matrix must be multiplied by <code>jacfac[i]*jacfac[j]</code>.</p>

<p>For examples on how to implement this in practice, see the portions of code delimited by "#ifdef BOX_CONSTRAINTS" in the following source files: <code>tlmderc.c</code>, <code>thybrj.c</code>, <code>tchkderc.c</code>.</p>

<h2>Equivalence table with other libraries</h2>
<p>The following table may be useful if you need to switch to or from another library.</p>
<table>
<caption>Equivalence table between MINPACK and NAG, NPL, SLATEC, levmar and <a href="http://www.gnu.org/software/gsl/">GSL</a></caption>
<tr><th>MINPACK</th> <th>NAG          </th> <th>NPL   </th> <th>SLATEC</th> <th>levmar     </th> <th>GSL                             </th></tr>
<tr><td>lmdif  </td> <td>E04FCF       </td> <td>LSQNDN</td> <td>DNLS1 </td> <td>dlevmar_dif</td> <td>                                </td></tr>
<tr><td>lmdif1 </td> <td>E04FYF       </td> <td>LSNDN1</td> <td>DNLS1E</td> <td>dlevmar_dif</td> <td>                                </td></tr>
<tr><td>lmder  </td> <td>E04GDF/E04GBF</td> <td>LSQFDN</td> <td>DNLS1 </td> <td>dlevmar_der</td> <td>gsl_multifit_fdfsolver_lmsder   </td></tr>
<tr><td>lmder1 </td> <td>E04GZF       </td> <td>LSFDN2</td> <td>DNLS1E</td> <td>dlevmar_der</td> <td>                                </td></tr>
<tr><td>lmstr  </td> <td>*            </td> <td>*     </td> <td>DNLS1 </td> <td>           </td> <td>                                </td></tr>
<tr><td>hybrd  </td> <td>C05NCF       </td> <td>*     </td> <td>DNSQ  </td> <td>           </td> <td>gsl_multiroot_fsolver_hybrids   </td></tr>
<tr><td>hybrd1 </td> <td>C05NBF       </td> <td>*     </td> <td>DNSQE </td> <td>           </td> <td>                                </td></tr>
<tr><td>hybrj  </td> <td>C05PCF       </td> <td>*     </td> <td>DNSQ  </td> <td>           </td> <td>gsl_multiroot_fdfsolver_hybridsj</td></tr>
<tr><td>hybrj1 </td> <td>C05PBF       </td> <td>*     </td> <td>DNSQE </td> <td>           </td> <td>                                </td></tr>
<tr><td>covar  </td> <td>E04YCF       </td> <td>*     </td> <td>DCOV  </td> <td>           </td> <td>gsl_multifit_covar              </td></tr>
<tr><td>chkder </td> <td>C05ZAF       </td> <td>      </td> <td>      </td> <td>           </td> <td>                                </td></tr>
</table>

<h2>Other MINPACK implementations</h2>
<ul>
  <li>by John Burkardt: <a href="http://people.sc.fsu.edu/~jburkardt/cpp_src/minpack/minpack.html">C++</a>, <a href="http://people.sc.fsu.edu/~jburkardt/f77_src/minpack/minpack.html">FORTRAN77</a>, <a href="http://people.sc.fsu.edu/~jburkardt/f_src/minpack/minpack.html">FORTRAN90</a>.</li>
  <li>by Steve Verrill: <a href="http://www1.fpl.fs.fed.us/Minpack_f77.java">Java</a> (<a href="http://www1.fpl.fs.fed.us/optimization/Minpack_f77.html">documentation</a>, <a href="http://www1.fpl.fs.fed.us/minpack.prob.html">problems</a>).</li>
  <li>by Alan Miller: <a href="http://jblevins.org/mirror/amiller/lm.zip">FORTRAN90</a>.</li>
  <li><a href="http://quantlib.org/">Quantlib</a> has a C++ MINPACK hidden deep inside (<a href="https://github.com/lballabio/quantlib/blob/master/QuantLib/ql/math/optimization/lmdif.cpp">C++</a>, <a href="https://github.com/lballabio/quantlib/blob/master/QuantLib/ql/math/optimization/lmdif.hpp">header</a>, <a href="http://www.quantcode.com/modules/mydownloads/singlefile.php?cid=10&amp;lid=436">tutorial</a>).</li>
  <li>GPL-licensed implementations of MINPACK algorithms in C are availaible from the <a href="http://www.gnu.org/software/gsl/">GNU Scientific Library</a>.</li>
  <li>Python library scipy, module <code>scipy.optimize.leastsq</code>,</li>
  <li><a href="http://www.ittvis.com/">IDL</a>, add-on <a href="http://cow.physics.wisc.edu/~craigm/idl/fitting.html">MPFIT</a>.</li>
  <li><a href="http://www.r-project.org/">R</a> has the <a href="http://cran.r-project.org/web/packages/minpack.lm/index.html">minpack.lm</a> package.</li>
  <li><a href="http://eigen.tuxfamily.org/">Eigen</a> has an unsupported <a href="http://eigen.tuxfamily.org/dox/unsupported/group__NonLinearOptimization__Module.html">nonlinear optimization</a> module based on cminpack.</li>
  <li><a href="http://ceres-solver.org/">Ceres Solver</a> is not derived from MINPACK, but is probably the best available alternative, with lots of features (New BSD License).</li>
</ul>

<h2>History</h2>
<ul>
  <li>1.3.7 (//): Makefile cleanups. Cmake-related fixes. Add Appveyor CI.</li>
  <li>1.3.6 (24/02/2017): Fix FreeBSD build. CMake: install CMinpackConfig.cmake rather than FindCMinpack.cmake, and add option USE_BLAS to compile with blas.</li>
  <li>1.3.5 (28/05/2016): Add support for compiling a long double version (Makefile only). CMake: static libraries now have the suffix <code>_s</code>.</li>
  <li>1.3.4 (28/05/2014): Add FindCMinpack.cmake cmake module. If you use the cmake install, finding CMinpack from your <code>CMakeLists.txt</code> (especially on Windows) is as easy as <code>find_package(CMinpack)</code>.</li>
  <li>1.3.3 (04/02/2014): Add documentation and examples abouts how to add box constraints to the variables. <a href="https://travis-ci.org/devernay/cminpack">Continuous integration using Travis CI</a></li>
  <li>1.3.2 (27/10/2013): Minor change in the CMake build: also set SOVERSION.</li>
  <li>1.3.1 (02/10/2013): Fix CUDA examples compilation, and remove non-free files.</li>
  <li>1.3.0 (09/06/2012): Optionally use LAPACK and CBLAS in lmpar, qrfac, and qrsolv. Added "make lapack" to build the LAPACK-based cminpack and "make checklapack" to test it (results of the test may depend on the underlying LAPACK and BLAS implementations). On 64-bits architectures, the preprocessor symbol __LP64__ must be defined (see cminpackP.h) if the LAPACK library uses the LP64 interface (i.e. 32-bits integer, vhereas the ILP interface uses 64 bits integers).</li>
  <li>1.2.2 (16/05/2012): Update Makefiles and documentation (see "Using CMinpack" above) for easier building and testing.</li>
  <li>1.2.1 (15/05/2012): The library can now be built as double, float or half versions. Standard tests in the "examples" directory can now be lauched using "make check" (to run common tests, including against the float version), "make checkhalf" (to test the half version) and "make checkfail" (to run all the tests, even those that fail).</li>
  <li>1.2.0 (14/05/2012): Added original FORTRAN sources for better testing (type "make" in directory fortran, then "make" in examples and follow the instructions). Added driver tests lmsdrv, chkdrv, hyjdrv, hybdrv. Typing "make alltest" in the examples directory will run all possible test combinations (make sure you have gfortran installed).</li>
  <li>1.1.5 (04/05/2012): cminpack now works in CUDA, thanks to Jordi Bataller Mascarell, type "make" in the "cuda" subdir (be careful, though: this is a straightforward port from C, and each problem is solved using a single thread). cminpack can now also be compiled with single-precision floating point computation (define __cminpack_real__ to float when compiling and using the library). Fix cmake support for CMINPACK_LIB_INSTALL_DIR. Update the reference files for tests.</li>
  <li>1.1.4 (30/10/2011): Translated all the Levenberg-Marquardt code (lmder, lmdif, lmstr, lmder1, lmdif1, lmstr1, lmpar, qrfac, qrsolv, fdjac2, chkder) to use C-style indices.</li>
  <li>1.1.3 (16/03/2011): Minor fix: Change non-standard strnstr() to strstr() in genf77tests.c.</li>
  <li>1.1.2 (07/01/2011): Fix Windows DLL building (David Graeff) and document covar in cminpack.h.</li>
  <li>1.1.1 (04/12/2010): Complete rewrite of the C functions (without trailing underscore in the function name). Using the original FORTRAN code, the original algorithms structure was recovered, and many goto's were converted to if...then...else. The code should now be both more readable and easier to optimize, both for humans and for compilers. Added lmddrv and lmfdrv test drivers, which test a lot of difficult functions (these functions are explained in <a href="http://scholar.google.fr/scholar?q=10.1145%2F355934.355936">Testing Unconstrained Optimization Software</a> by Mor&eacute; et al.). Also added the pkg-config files to the cmake build, as well as an "uninstall" target, contributed by Geoffrey Biggs.</li>
  <li>1.0.4 (18/10/2010): Support for shared library building using CMake, thanks to Goeffrey Biggs from AIST and Radu Bogdan Rusu from Willow Garage. Shared libraries can be enabled using cmake options, as in: <code>cmake -DSHARED_LIBS=ON -DBUILD_EXAMPLES=OFF path_to_sources</code></li>
  <li>1.0.3 (18/03/2010): Added CMake support. XCode build is now Universal (i386+ppc). Added tfdjac2_ and tfdjac2c examples, which test the accuracy of a finite-differences approximation of the Jacobian. Bug fix in tlmstr1 (signaled by Thomas Capricelli).</li>
  <li>1.0.2 (27/02/2009): Added Xcode and Visual Studio project files</li>
  <li>1.0.1 (17/12/2007): bug fix in covar() and covar_(), the computation of tolr caused a segfault (signaled by Timo Hartmann).</li>
  <li>1.0.0 (24/04/2007): Initial revision.</li>
</ul>

<h2>Future work</h2>

<p>There is now a very powerful alternative to MINPACK, which is the <a href="http://ceres-solver.org/">Ceres Solver</a>. You may want to consider using Ceres for any new project.</p>

<p>The main feature that's missing on cminpack is the possibility to add constraints on variables. Simple boundary constraints should be enough, as implemented in <a href="http://www.alglib.net/optimization/levenbergmarquardt.php">ALGLIB</a> or <a href="http://www.physics.wisc.edu/~craigm/idl/cmpfit.html">MPFIT</a>, and they can easily be implemented using the hack above (section "Simulating box constraints").</p>

<p><a href="http://www.ics.forth.gr/~lourakis/levmar/">levmar</a> also has linear constraints, but they should not be necessary since linear constraints can be changed to box constraints by a simple change of variables. If you really need nonlinear constraints, and no reparameterization of variables (which may be able to linearize these constraints), you should consider using <a href="http://ab-initio.mit.edu/wiki/index.php/NLopt">NLopt</a> instead of cminpack.</p>

<p>Please file a <a href="https://github.com/devernay/cminpack/issues">GitHub issue</a> for any suggestion or request.</p>

<address>
<a href="http://devernay.free.fr/email.html">Fr&eacute;d&eacute;ric Devernay</a></address>
     
<hr />

<p> <a href="http://validator.w3.org/check/referer"> <img class="borderless"
src="images/vxhtml11.png" alt="Valid XHTML 1.1!" height="31"
width="88" /></a>
<a href="http://jigsaw.w3.org/css-validator/check/referer">
<img class="borderless"  height="31"
width="88"
       src="images/vcss.png" 
       alt="Valid CSS!" />
</a>
<a href="http://www.w3.org/WAI/WCAG1AA-Conformance"
      title="Explanation of Level Double-A Conformance">
  <img class="borderless" height="32" width="88" 
          src="images/wcag1AA.png"
          alt="Level Double-A conformance icon, 
          W3C-WAI Web Content Accessibility Guidelines 1.0" /></a>
      </p>
</body>
</html>

